<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PHP学习测试首页</title>
<link type="text/css" rel="stylesheet" href="public/css/style.css" />
<link type="text/css" rel="stylesheet" href="./public/css/main.css" />
<script type="text/javascript" src="./public/scripts/function.js"></script>
</head>
<body>
<div id="header" class="wrap">
	<div id="logo"><img src="./public/images/logo.gif" /></div>
	<div class="help"><a href="index.php?m=car&a=showcar" class="shopping">购物车</a><a href="<?php echo $url;?>"><?php echo $name; ?></a><a href="index.php?m=register&a=reg">注册</a><a href="index.php?m=register&a=logout">退出</a></div>
	<div class="navbar">
		<ul class="clearfix">
			<li class="current"><a href="#">首页</a></li>
			<li><a href="#">图书</a></li>
			<li><a href="#">百货</a></li>
			<li><a href="#">品牌</a></li>
			<li><a href="#">促销</a></li>
		</ul>
	</div>
</div>
<div id="childNav">
	<div class="wrap">
		<ul class="clearfix">
			<li class="first"><a href="#">音乐</a></li>
			<li><a href="#">影视</a></li>
			<li><a href="#">少儿</a></li>
			<li><a href="#">动漫</a></li>
			<li><a href="#">小说</a></li>
			<li><a href="#">外语</a></li>
			<li><a href="#">数码相机</a></li>
			<li><a href="#">笔记本</a></li>
			<li><a href="#">羽绒服</a></li>
			<li><a href="#">秋冬靴</a></li>
			<li><a href="#">运动鞋</a></li>
			<li><a href="#">美容护肤</a></li>
			<li><a href="#">家纺用品</a></li>
			<li><a href="#">婴幼奶粉</a></li>
			<li><a href="#">饰品</a></li>
			<li class="last"><a href="#">Investor Relations</a></li>
		</ul>
	</div>
</div>
<div id="main" class="wrap">
	<div class="lefter">
		<div class="box">
			<h2>商品分类</h2>
			<dl>
				<dt>PHP百货店</dt>
				<!-- 产品分类列表展示 -->
			<?php foreach($cats as $v):?>
				<dd><a href="index.php?m=index&a=productlist"><?php echo $v['c_name'];?></a></dd>
			<?php endforeach; ?>
				
				<!-- 
				<dd><a href="product-list.html">音乐</a></dd>
				<dd><a href="product-list.html">运动健康</a></dd>
				<dd><a href="product-list.html">服装</a></dd>
				<dd><a href="product-list.html">家居</a></dd>
				<dd><a href="product-list.html">美妆</a></dd>
				<dd><a href="product-list.html">母婴</a></dd>
				<dd><a href="product-list.html">食品</a></dd>
				<dd><a href="product-list.html">手机数码</a></dd>
				<dd><a href="product-list.html">家具首饰</a></dd>
				<dd><a href="product-list.html">手表饰品</a></dd>
				<dd><a href="product-list.html">鞋包</a></dd>
				<dd><a href="product-list.html">家电</a></dd>
				<dd><a href="product-list.html">电脑办公</a></dd>
				<dd><a href="product-list.html">玩具文具</a></dd>
				<dd><a href="product-list.html">汽车用品</a></dd> -->
			</dl>
		</div>
		<div class="spacer"></div>
		<div class="last-view">
			<h2>最近浏览</h2>
			<dl class="clearfix">
			<?php foreach($newgoods as $k=>$v): ?>
				<dt><img src="./admin/public/uploads/<?php echo $v['g_thumb']; ?>" /></dt>
				<dd><a href="index.php?m=index&a=goodsview&id=<?php echo $v['g_id']; ?>"><?php echo $v['g_name']; ?></a></dd>
				<!-- <dt><img src="./public/images/product/0_tiny.gif" /></dt>
				<dd><a href="product-view.html">法国德菲丝松露精品巧克力500g/盒</a></dd> -->
			<?php endforeach; ?>
			</dl>
		</div>
	</div>
	<div class="main">
		<div class="price-off">
			<h2>今日特价</h2>
			<ul class="product clearfix">
			<!-- 循环遍历前面8个产品，序列，并显示在主页上面的框框里面 -->
			<?php foreach($goods as $k=>$v): ?>
				<li>
					<dl>
						<dt><a href="index.php?m=index&a=goodsview&id=<?php echo $v['g_id'];?>" target="_blank"><img src="./admin/public/uploads/<?php echo $v['g_image']; ?>" /></a></dt>
						<dd class="title"><a href="index.php?m=index&a=goodsview&id=<?php echo $v['g_id'];?>" target="_blank"><?php echo $v['g_name'];?></a></dd>
						<dd class="price"><?php echo $v['g_price'];?></dd>
					</dl>
				</li>
			<?php endforeach; ?>	
				
				
				
				<!-- <li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/2.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">乐扣普通型保鲜盒圣诞7件套</a></dd>
						<dd class="price">￥69.90</dd>
					</dl>
				</li>
				<li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/3.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">欧珀莱均衡保湿四件套</a></dd>
						<dd class="price">￥279.0</dd>
					</dl>
				</li>
				<li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/4.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">联想笔记本电脑 高速独立显存</a></dd>
						<dd class="price">￥4199</dd>
					</dl>
				</li>
				<li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/5.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">法姿韩版显瘦彩边时尚牛仔铅笔裤</a></dd>
						<dd class="price">￥49.00</dd>
					</dl>
				</li>
				<li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/6.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">Genius925纯银施华洛世奇水晶吊坠</a></dd>
						<dd class="price">￥69.90</dd>
					</dl>
				</li>
				<li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/7.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">利仁2018M福满堂电饼铛 好用实惠</a></dd>
						<dd class="price">￥268.0</dd>
					</dl>
				</li>
				<li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/8.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">达派高档拉杆箱20寸 经典款式</a></dd>
						<dd class="price">￥198.0</dd>
					</dl>
				</li> -->
			</ul>
		</div>
		<div class="side">
			<div class="news-list">
				<h4>新闻动态</h4>
				<ul>
				<?php foreach($news as $v):?>
				
					<li><a href="index.php?m=index&a=newsview" target="_blank"><?php echo $v['n_title']; ?></a></li>
				<?php endforeach; ?><!-- 这里数据库没取出id的值，所以这里不能传值 -->
				
					<!-- <li><a href="news-view.html" target="_blank">抢钱啦</a></li>
					<li><a href="news-view.html" target="_blank">抢钱啦</a></li>
					<li><a href="news-view.html" target="_blank">抢钱啦</a></li>
					<li><a href="news-view.html" target="_blank">抢钱啦</a></li>
					<li><a href="news-view.html" target="_blank">抢钱啦</a></li>
					<li><a href="news-view.html" target="_blank">抢钱啦</a></li> -->
				</ul>
			</div>
			<div class="spacer"></div>
			<div class="news-list">
				<h4>最新留言</h4>
				<ul>
					<?php foreach($msg as $v):?>
					
						<li><a href="index.php?m=index&a=messagesview" target="_blank"><?php echo $v['m_title']; ?></a></li>
					<?php endforeach; ?><!-- 这里数据库没取出id的值，所以这里不能传值 -->
					
					
					<!-- <li><a href="news-view.html" target="_blank">抢钱啦</a></li>
					<li><a href="news-view.html" target="_blank">抢钱啦</a></li>
					<li><a href="news-view.html" target="_blank">抢钱啦</a></li>
					<li><a href="news-view.html" target="_blank">抢钱啦</a></li>
					<li><a href="news-view.html" target="_blank">抢钱啦</a></li>
					<li><a href="news-view.html" target="_blank">抢钱啦</a></li> -->
				</ul>
			</div>
		</div>
		<div class="spacer clear"></div>
		<div class="hot">
			<h2>热卖推荐</h2>
			<ul class="product clearfix">
			<!-- 取出后面的12行数据，从数据库取出来的，分段取数据，显示在热卖推荐里面的12行数据 -->
			<!-- 想要 修改的话，可以在前台goodsModel.clss.php里面修改数据 -->
			<?php foreach($goods12 as $k=>$v): ?>
				<li>
					<dl>
						<dt><a href="index.php?m=index&a=goodsview&id=<?php echo $v['g_id'];?>" target="_blank"><img src="./admin/public/uploads/<?php echo $v['g_image']; ?>" /></a></dt>
						<dd class="title"><a href="index.php?m=index&a=goodsview&id=<?php echo $v['g_id'];?>" target="_blank"><?php echo $v['g_name']?></a></dd>
						<dd class="price"><?php echo $v['g_price']?></dd>
					</dl>
				</li>
			<?php endforeach; ?>
				<!-- <li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/12.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">乐扣普通型保鲜盒圣诞7件套</a></dd>
						<dd class="price">￥69.90</dd>
					</dl>
				</li>
				<li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/13.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">欧珀莱均衡保湿四件套</a></dd>
						<dd class="price">￥279.0</dd>
					</dl>
				</li>
				<li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/14.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">联想笔记本电脑 高速独立显存</a></dd>
						<dd class="price">￥4199</dd>
					</dl>
				</li>
				<li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/15.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">法姿韩版显瘦彩边时尚牛仔铅笔裤</a></dd>
						<dd class="price">￥49.00</dd>
					</dl>
				</li>
				<li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/16.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">Genius925纯银施华洛世奇水晶吊坠</a></dd>
						<dd class="price">￥69.90</dd>
					</dl>
				</li>
				<li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/17.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">利仁2018M福满堂电饼铛 好用实惠</a></dd>
						<dd class="price">￥268.0</dd>
					</dl>
				</li>
				<li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/18.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">达派高档拉杆箱20寸 经典款式</a></dd>
						<dd class="price">￥198.0</dd>
					</dl>
				</li>
				<li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/19.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">爱国者MP4 全屏触摸多格式播放 4G</a></dd>
						<dd class="price">￥289.0</dd>
					</dl>
				</li>
				<li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/20.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">多美滋金装金盾3阶段幼儿配方奶粉</a></dd>
						<dd class="price">￥186.0</dd>
					</dl>
				</li>
				<li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/21.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">法国德菲丝松露精品巧克力500g/盒</a></dd>
						<dd class="price">￥108.0</dd>
					</dl>
				</li>
				<li>
					<dl>
						<dt><a href="product-view.html" target="_blank"><img src="./public/images/product/12.jpg" /></a></dt>
						<dd class="title"><a href="product-view.html" target="_blank">乐扣普通型保鲜盒圣诞7件套</a></dd>
						<dd class="price">￥69.90</dd>
					</dl>
				</li> -->
			</ul>
		</div>
	</div>
	<div class="clear"></div>
</div>
<!-- --------------foot---------------- -->
	<div id="s_ftw">
	
		<div class="ft_quicklinks">
			<div class="ftql cf">
				<ul>
					<li class="ftql_s">
						<h3>购物指南</h3>
						<ul>
							<li><a href="">怎样购物</a></li>
							<li><a href="">会员制</a></li>
							<li><a href="">积分制度</a></li>
							<li><a href="">优惠券介绍</a></li>
							<li><a href="">订单状态说明</a></li>
						</ul>
					</li>
					<li class="ftql_s">
						<h3>服务条款</h3>
						<ul>
							<li><a href="">售后条款</a></li>
							<li><a href="">退换货说明</a></li>
							<li><a href="">联系客服</a></li>
						</ul>
					</li>
					<li class="ftql_s">
						<h3>配送方式</h3>
						<ul>
							<li><a href="">上门自提</a></li>
							<li><a href="">快递运输</a></li>
							<li><a href="">特快专递（EMS）</a></li>
							<li><a href="">如何送礼</a></li>
						</ul>
					</li>
					<li class="ftql_s">
						<h3>支付帮助</h3>
						<ul>
							<li><a href="">货到付款</a></li>
							<li><a href="">在线支付</a></li>
							<li><a href="">邮政汇款</a></li>
							<li><a href="">银行转账</a></li>
							<li><a href="">发票说明</a></li>
						</ul>
					</li>
					<li class="ftql_s">
						<h3>关于PHP测试商城</h3>
						<ul>
							<li><a href="">商城介绍</a></li>
							<li><a href="">团队</a></li>
							<li><a href="">媒体报道</a></li>
							<li><a href="">招纳贤士</a></li>
							<li><a href="">公告</a></li>
						</ul>
					</li>
					<li class="ftql_s">
						<div class="ftql_d">
							<div class="str">客服中心信箱：</div>
							<div class="val"><a href="mailto:service@shunkelong.com">4873473@qq.com</a></div>
						</div>
						<div class="ftql_d">
							<div class="str">客服中心热线：</div>
							<div class="val stel">4008-008-008</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	
		<div id="s_ft">
			<div class="ft_suggest pt100">请帮助我们提高！<a href="#">商城首页意见反馈</a></div>
			<div class="ft_banners1 tac pbt10">
				<ul>
					<li><a href="#"><img src="./public/images/ft_1.gif" border="0" /></a></li>
					<li><a href="#"><img src="./public/images/ft_2.gif" border="0" /></a></li>
					<li><a href="#"><img src="./public/images/ft_3.gif" border="0" /></a></li>
				</ul>
			</div>
			<!-- <div class="copyright tac pbt10">版权所有 Copyright&copy; PHP测试商城 All Rights Reserved 版权所有 </div> -->
			<div class="ft_banners2 tac">
				<ul>
					<li><a href="#"><img src="./public/images/u255.png" border="0" /></a></li>
					<li><a href="#"><img src="./public/images/u257.png" border="0" /></a></li>
					<li><a href="#"><img src="./public/images/u259.png" border="0" /></a></li>
					<li><a href="#"><img src="./public/images/u261.png" border="0" /></a></li>
				</ul>
			</div>
		</div>
		
	</div><!--s_ftw end-->

<!-- ------------------------------ -->
<div id="footer">
	Copyright &copy; 2015 PHP学习测试 All Rights Reserved. 粤ICP证1000001号
</div>
</body>
</html>
